home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11889 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: tank.news.pipex.net!pipex!iol!usenet
  2. From: David Byrden <goyra@iol.ie>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: MSVC++4.0 compile error- help needed
  5. Date: 16 Mar 1996 22:01:27 GMT
  6. Organization: Ireland On-Line
  7. Message-ID: <4ifdnn$m8o@nuacht.iol.ie>
  8. References: <4if0if$m68@news.csus.edu>
  9. NNTP-Posting-Host: dialup-184.dublin.iol.ie
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22KIT (Windows; I; 16bit)
  14.  
  15.  
  16.  
  17. >>However, when I create a Windows program (MDI, SDI, Dialog-based) and 
  18. >> add the CTest.cpp to the project and the CTest.h to a simple dialog 
  19. >> class that I create, upon building the project I receive the following 
  20. >> message:
  21.  
  22. >> :\Projects\test\CTest.cpp(23) : fatal error C1010: unexpected end of 
  23. >> file while looking for precompiled header directive
  24.  
  25.  
  26.   Visual C++ can speed up its compilations by using a "precompiled 
  27. header". The reason is that you often include many large header files 
  28. which never change, and which get compiled repeatedly. This feature lets 
  29. the compiler "predigest" them just once and store the results in a PCH 
  30. file.
  31.  
  32.   I guess that precompiled headers are the default for MFC programs, 
  33. because of the large MFC headers. You can dig around in your project 
  34. settings and disable the feature.
  35.  
  36.   If you want to actually use it, you must include the header file 
  37. STDAFX.H at the top of each CPP file. The predigested stuff is whatever 
  38. you put in STDAFX.H
  39.  
  40.  
  41.                                         David
  42.  
  43.  
  44.  
  45.